#include <iostream>
using namespace std;
/*
	Date:2014-01-02

	bir pointer ni delete kilip bolop qokom pointer p=0; kiliximiz kirak
	bolmisa ikkinji kitim xu pointer uqun ajiratkan boxlok ikkinji bir poyinterneng 
	korsatkan adirsi bilan ohxax bop kilip birinji pionterneng kimmitini ozgartsak
	ikkinjisineng kimmitimu ozgurup kitidu ;

	maslan towandikidak:

*/

void main(){
	int *p =new int;
	*p=10;
	cout<<"p korsatkan adirdiki kimmat :\t"<<*p<<endl;
	delete p;
	cout<<"p ni yuwatkandiki kimmat :\t"<<*p<<endl;
	int *p1=new int;
	cout<<"yingden p1 ni kurup bolgandiki p korsatkan adiris :\t"<<p<<endl;
	cout<<"yingden p1 ni kurup bolgandiki p1 korsatkan adiris :\t"<<p1<<endl;
	*p=9999; // bu yarda hatalik qikidu yani *p bir p1 korsatkandiki adirstiki kimmatni ozgartiwitidu
	cout<<"*p=9999 kiyinki p neng kimmiti :\t"<<*p<<endl;
	cout<<"*p=9999 kiyinki p1 ni kurup bolgandiki p1 neng kimmiti :\t"<<*p1<<endl;
	delete p1;

}